from xadmin.models import AuditLog


def add_log(request, action, siteid):
    AuditLog.objects.create(site_id=siteid, user=request.user, action=action)